import Storage from './storagekey';
const UserinfoKey = 'GPT-uierys';

export function getToken(): string {
  return Storage.get(UserinfoKey) || 'undefined';
}

export function setToken(token: string) {
  // 保存信息的时候 保存token
  Storage.set(UserinfoKey, token);
}

export function verifyToken() {
  let tn = getToken();
  return tn === 'undefined';
}

export function removeStorage() {
  Storage.clear();
}
